
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
DIV.jogger { 
PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 7px;
 PADDING-TOP: 2px; FONT-FAMILY: "Lucida Sans Unicode",
 "Lucida Grande", LucidaGrande, "Lucida Sans", Geneva, Verdana, sans-serif ;text-align: center;
} 
DIV.jogger A { 
PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em;
 MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; 
BACKGROUND-COLOR: #ee4e4e; TEXT-DECORATION: none 
} 
DIV.jogger A:hover { 
PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em;
 MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; BACKGROUND-COLOR: #de1818 
} 
DIV.jogger A:active { 
PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em;
 MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; BACKGROUND-COLOR: #de1818 
} 
DIV.jogger SPAN.current { 
PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em;
 MARGIN: 2px; COLOR: #6d643c; PADDING-TOP: 0.5em; BACKGROUND-COLOR: #f6efcc 
} 
DIV.jogger SPAN.disabled { 
DISPLAY: none 
} 
</style>


<include file="Public:header" />
    <script>
          function all_checked() {
                var all_check = document.getElementById("allCheck");
              var check=document.getElementsByName("Check[]");
                if (all_check.checked) {
                    for(j=0;j<check.length;j++){
                        check[j].checked=1;
                    }
                } else {
                    for(j=0;j<check.length;j++){
                        check[j].checked=0;
                    }
                }
             }
  
          function printCode() {
          
              var check=document.getElementsByName("Check[]");
              var flag=0;
              for(j=0;j<check.length;j++){
                  if(check[j].checked)
                  {
                      flag=1;   
                  }
              }
              if(flag==0)
              {
                  alert("请选择");
                  return false;
              }
              else
              {
                  location.replace('printQrcode');
                  return true;
              }
              
          }
    </script>
<include file="Public:head"  />
   <include file="Public:first"  />
  <!-- // SITE HEADER -->

<div class="modal-shiftfix" id="all">
    <div id="new_all" class="container center-block" style="display: none;">
        <div align="center" style="margin-bottom: 20px">
            <button class="btn btn-default " onclick="back()" id="back">返回</button>
            <button class="btn btn-default " onclick="print()">打印</button>
        </div>
    </div>


    <div class="container-fluid main-content"  style="min-height:560px">
        <div class="col-md-3  col-xs-12 col-sm-6 col-sm-offset-3 col-md-offset-4 col-xs-offset-2" >
            <form  method="post"  class="form-horizontal" action="{:U('dressadd')}">
				        


                <input class="form-control" placeholder="发件人" type="text" id="username" name="username" value="{$_SESSION['username']}" required>
                <br>
                <input class="form-control" placeholder="收货人" type="text" id="recipientsname" name="recipientsname" >
                <br>
              <input class="form-control" placeholder="联系电话" type="text" id="tel" name="tel">
                <br>
              <input class="form-control" placeholder="详细地址" type="text" id="detaildress" name="detaildress" >
                <br>
                <input class="form-control" placeholder="备注" type="text" id="special" name="special" >
                <br>
                
                <input class="btn btn-block btn-info "  type="submit" value="生成二维码">
            </form>
            
        </div>

        <form  method="post"  class="form-horizontal" action="{:U('dresslist')}"  enctype="multipart/form-data" onsubmit="return printCode();" >
           
        <div class="col-md-10  col-xs-12 col-sm-6 col-sm-offset-3 col-md-offset-1 col-xs-offset-2 " >
           
            <table id="qrcode" class="table  table-responsive">
                <tr>
                    <th>
                        <label><input  class="task-input" type="checkbox" id="allCheck" onchange="all_checked()"><span>全选</span></label>
                    </th>
                    <th>二维码</th>
                    <th>收件人姓名</th>
                    <th>二维码信息</th>
					          <th>创建时间</th>
                    <th>操作</th>
                </tr>
                <!-- js方法批量打印二维码-->
                <volist name="dress" id="vo">
                     <tr class="QRCodePrint">
                        <td>
                            <label><input  class="task-input" type="checkbox"  name="Check[]" value="{$vo.dressid}"><span></span></label>
                        </td>
                        
                        <td>
                      
                            <img id="a" src="__PUBLIC__/Uploads/qrpath/{$vo.qrpath}" width="80">
                        </td>
                       
                        <td>
                            <p>{$vo.recipientsname}</p>
                        </td>
                        <td>
                            <p>

						          收件人姓名：{$vo.recipientsname}<br>
                      详细地址：{$vo.detaildress}<br>
						          联系电话:{$vo.tel}<br>
						          备注：{$vo.special}   
                        </td>
						<td>
                            <p >{$vo.createtime}</p>
                        </td>
                        <td><a href="delqrcode/dressid/{$vo.dressid}" onclick="return confirm('你确定要删除吗？')"><i class="icon-remove"></i>删除</a></li>
                        </td>
                    </tr>
                   </volist>
                </table>
            </form>
  <div style="text-align:center"> <div> 
     <div class="jogger">{$link}</div>
   </div>        
   </div>
        </div>

        
    </div>

    <br>
   
   <include file="Public:footer" />

</div>
</div>

</body>

</html>